function has() {
    var permissions = ['ohos.permission.APPROXIMATELY_LOCATION','ohos.permission.LOCATION'];
    window.plugins.Permission.has(permissions, function(result){
        document.getElementById("hasInfo").innerHTML = JSON.stringify(result);
    },function(){
    })
}

function request() {
    var permissions = ['ohos.permission.APPROXIMATELY_LOCATION','ohos.permission.LOCATION'];
    window.plugins.Permission.request(permissions, function(result){
        document.getElementById("requestInfo").innerHTML = JSON.stringify(result);
    },function(){
    })
}

function checkPermission() {
    var permissions = ['ohos.permission.APPROXIMATELY_LOCATION','ohos.permission.LOCATION'];
    cordova.plugins.permissions.checkPermission(permissions, function(result){
        document.getElementById("checkPermissionInfo").innerHTML = JSON.stringify(result);
    },function(){
    })
}

function requestPermission() {
    var permissions = 'ohos.permission.APPROXIMATELY_LOCATION';
    cordova.plugins.permissions.requestPermission(permissions, function(result){
        document.getElementById("requestPermissionInfo").innerHTML = JSON.stringify(result);
    },function(){
    })
}

function requestPermissions() {
    var permissions = ['ohos.permission.APPROXIMATELY_LOCATION','ohos.permission.LOCATION'];
    cordova.plugins.permissions.requestPermissions(permissions, function(result){
        document.getElementById("requestPermissionInfos").innerHTML = JSON.stringify(result);
    },function(){
    })
}